#pragma once
// MESSAGE ZD_FCDATA_NX PACKING

#define MAVLINK_MSG_ID_ZD_FCDATA_NX 212


typedef struct __mavlink_zd_fcdata_nx_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
 uint32_t frame_id; /*< [ms] frame_id.*/
 float q1; /*<  Quaternion component 1, w (1 in null-rotation)*/
 float q2; /*<  Quaternion component 2, x (0 in null-rotation)*/
 float q3; /*<  Quaternion component 3, y (0 in null-rotation)*/
 float q4; /*<  Quaternion component 4, z (0 in null-rotation)*/
 float rollspeed; /*< [rad/s] Roll angular speed*/
 float pitchspeed; /*< [rad/s] Pitch angular speed*/
 float yawspeed; /*< [rad/s] Yaw angular speed*/
 float x; /*< [m] X Position in NED frame*/
 float y; /*< [m] Y Position in NED frame*/
 float z; /*< [m] Z Position in NED frame (note, altitude is negative in NED)*/
 float vx; /*< [m/s] X velocity in NED frame*/
 float vy; /*< [m/s] Y velocity in NED frame*/
 float vz; /*< [m/s] Z velocity in NED frame*/
 float afx; /*< [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/
 float afy; /*< [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/
 float afz; /*< [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N*/
 float yaw; /*< [rad] yaw setpoint*/
 float yaw_rate; /*< [rad/s] yaw rate setpoint*/
 uint16_t type_mask; /*<  Bitmap to indicate which dimensions should be ignored by the vehicle.*/
 uint8_t fc_status1; /*< [ms] frame_id.*/
 uint8_t fc_status2; /*< [ms] frame_id.*/
} mavlink_zd_fcdata_nx_t;

#define MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN 84
#define MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN 84
#define MAVLINK_MSG_ID_212_LEN 84
#define MAVLINK_MSG_ID_212_MIN_LEN 84

#define MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC 18
#define MAVLINK_MSG_ID_212_CRC 18



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_ZD_FCDATA_NX { \
    212, \
    "ZD_FCDATA_NX", \
    23, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_zd_fcdata_nx_t, time_boot_ms) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_zd_fcdata_nx_t, frame_id) }, \
         { "fc_status1", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_zd_fcdata_nx_t, fc_status1) }, \
         { "fc_status2", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_zd_fcdata_nx_t, fc_status2) }, \
         { "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_zd_fcdata_nx_t, q1) }, \
         { "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_zd_fcdata_nx_t, q2) }, \
         { "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_zd_fcdata_nx_t, q3) }, \
         { "q4", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_zd_fcdata_nx_t, q4) }, \
         { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_zd_fcdata_nx_t, rollspeed) }, \
         { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_zd_fcdata_nx_t, pitchspeed) }, \
         { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_zd_fcdata_nx_t, yawspeed) }, \
         { "type_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_zd_fcdata_nx_t, type_mask) }, \
         { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_zd_fcdata_nx_t, x) }, \
         { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_zd_fcdata_nx_t, y) }, \
         { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_zd_fcdata_nx_t, z) }, \
         { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_zd_fcdata_nx_t, vx) }, \
         { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_zd_fcdata_nx_t, vy) }, \
         { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_zd_fcdata_nx_t, vz) }, \
         { "afx", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_zd_fcdata_nx_t, afx) }, \
         { "afy", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_zd_fcdata_nx_t, afy) }, \
         { "afz", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_zd_fcdata_nx_t, afz) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_zd_fcdata_nx_t, yaw) }, \
         { "yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_zd_fcdata_nx_t, yaw_rate) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_ZD_FCDATA_NX { \
    "ZD_FCDATA_NX", \
    23, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_zd_fcdata_nx_t, time_boot_ms) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_zd_fcdata_nx_t, frame_id) }, \
         { "fc_status1", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_zd_fcdata_nx_t, fc_status1) }, \
         { "fc_status2", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_zd_fcdata_nx_t, fc_status2) }, \
         { "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_zd_fcdata_nx_t, q1) }, \
         { "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_zd_fcdata_nx_t, q2) }, \
         { "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_zd_fcdata_nx_t, q3) }, \
         { "q4", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_zd_fcdata_nx_t, q4) }, \
         { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_zd_fcdata_nx_t, rollspeed) }, \
         { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_zd_fcdata_nx_t, pitchspeed) }, \
         { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_zd_fcdata_nx_t, yawspeed) }, \
         { "type_mask", NULL, MAVLINK_TYPE_UINT16_T, 0, 80, offsetof(mavlink_zd_fcdata_nx_t, type_mask) }, \
         { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_zd_fcdata_nx_t, x) }, \
         { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_zd_fcdata_nx_t, y) }, \
         { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_zd_fcdata_nx_t, z) }, \
         { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_zd_fcdata_nx_t, vx) }, \
         { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_zd_fcdata_nx_t, vy) }, \
         { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_zd_fcdata_nx_t, vz) }, \
         { "afx", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_zd_fcdata_nx_t, afx) }, \
         { "afy", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_zd_fcdata_nx_t, afy) }, \
         { "afz", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_zd_fcdata_nx_t, afz) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_zd_fcdata_nx_t, yaw) }, \
         { "yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_zd_fcdata_nx_t, yaw_rate) }, \
         } \
}
#endif

/**
 * @brief Pack a zd_fcdata_nx message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param frame_id [ms] frame_id.
 * @param fc_status1 [ms] frame_id.
 * @param fc_status2 [ms] frame_id.
 * @param q1  Quaternion component 1, w (1 in null-rotation)
 * @param q2  Quaternion component 2, x (0 in null-rotation)
 * @param q3  Quaternion component 3, y (0 in null-rotation)
 * @param q4  Quaternion component 4, z (0 in null-rotation)
 * @param rollspeed [rad/s] Roll angular speed
 * @param pitchspeed [rad/s] Pitch angular speed
 * @param yawspeed [rad/s] Yaw angular speed
 * @param type_mask  Bitmap to indicate which dimensions should be ignored by the vehicle.
 * @param x [m] X Position in NED frame
 * @param y [m] Y Position in NED frame
 * @param z [m] Z Position in NED frame (note, altitude is negative in NED)
 * @param vx [m/s] X velocity in NED frame
 * @param vy [m/s] Y velocity in NED frame
 * @param vz [m/s] Z velocity in NED frame
 * @param afx [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afy [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afz [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param yaw [rad] yaw setpoint
 * @param yaw_rate [rad/s] yaw rate setpoint
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, uint32_t frame_id, uint8_t fc_status1, uint8_t fc_status2, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz, float yaw, float yaw_rate)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, frame_id);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, q4);
    _mav_put_float(buf, 24, rollspeed);
    _mav_put_float(buf, 28, pitchspeed);
    _mav_put_float(buf, 32, yawspeed);
    _mav_put_float(buf, 36, x);
    _mav_put_float(buf, 40, y);
    _mav_put_float(buf, 44, z);
    _mav_put_float(buf, 48, vx);
    _mav_put_float(buf, 52, vy);
    _mav_put_float(buf, 56, vz);
    _mav_put_float(buf, 60, afx);
    _mav_put_float(buf, 64, afy);
    _mav_put_float(buf, 68, afz);
    _mav_put_float(buf, 72, yaw);
    _mav_put_float(buf, 76, yaw_rate);
    _mav_put_uint16_t(buf, 80, type_mask);
    _mav_put_uint8_t(buf, 82, fc_status1);
    _mav_put_uint8_t(buf, 83, fc_status2);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#else
    mavlink_zd_fcdata_nx_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.frame_id = frame_id;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.q4 = q4;
    packet.rollspeed = rollspeed;
    packet.pitchspeed = pitchspeed;
    packet.yawspeed = yawspeed;
    packet.x = x;
    packet.y = y;
    packet.z = z;
    packet.vx = vx;
    packet.vy = vy;
    packet.vz = vz;
    packet.afx = afx;
    packet.afy = afy;
    packet.afz = afz;
    packet.yaw = yaw;
    packet.yaw_rate = yaw_rate;
    packet.type_mask = type_mask;
    packet.fc_status1 = fc_status1;
    packet.fc_status2 = fc_status2;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_ZD_FCDATA_NX;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
}

/**
 * @brief Pack a zd_fcdata_nx message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param frame_id [ms] frame_id.
 * @param fc_status1 [ms] frame_id.
 * @param fc_status2 [ms] frame_id.
 * @param q1  Quaternion component 1, w (1 in null-rotation)
 * @param q2  Quaternion component 2, x (0 in null-rotation)
 * @param q3  Quaternion component 3, y (0 in null-rotation)
 * @param q4  Quaternion component 4, z (0 in null-rotation)
 * @param rollspeed [rad/s] Roll angular speed
 * @param pitchspeed [rad/s] Pitch angular speed
 * @param yawspeed [rad/s] Yaw angular speed
 * @param type_mask  Bitmap to indicate which dimensions should be ignored by the vehicle.
 * @param x [m] X Position in NED frame
 * @param y [m] Y Position in NED frame
 * @param z [m] Z Position in NED frame (note, altitude is negative in NED)
 * @param vx [m/s] X velocity in NED frame
 * @param vy [m/s] Y velocity in NED frame
 * @param vz [m/s] Z velocity in NED frame
 * @param afx [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afy [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afz [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param yaw [rad] yaw setpoint
 * @param yaw_rate [rad/s] yaw rate setpoint
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
                               uint32_t time_boot_ms, uint32_t frame_id, uint8_t fc_status1, uint8_t fc_status2, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz, float yaw, float yaw_rate)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, frame_id);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, q4);
    _mav_put_float(buf, 24, rollspeed);
    _mav_put_float(buf, 28, pitchspeed);
    _mav_put_float(buf, 32, yawspeed);
    _mav_put_float(buf, 36, x);
    _mav_put_float(buf, 40, y);
    _mav_put_float(buf, 44, z);
    _mav_put_float(buf, 48, vx);
    _mav_put_float(buf, 52, vy);
    _mav_put_float(buf, 56, vz);
    _mav_put_float(buf, 60, afx);
    _mav_put_float(buf, 64, afy);
    _mav_put_float(buf, 68, afz);
    _mav_put_float(buf, 72, yaw);
    _mav_put_float(buf, 76, yaw_rate);
    _mav_put_uint16_t(buf, 80, type_mask);
    _mav_put_uint8_t(buf, 82, fc_status1);
    _mav_put_uint8_t(buf, 83, fc_status2);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#else
    mavlink_zd_fcdata_nx_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.frame_id = frame_id;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.q4 = q4;
    packet.rollspeed = rollspeed;
    packet.pitchspeed = pitchspeed;
    packet.yawspeed = yawspeed;
    packet.x = x;
    packet.y = y;
    packet.z = z;
    packet.vx = vx;
    packet.vy = vy;
    packet.vz = vz;
    packet.afx = afx;
    packet.afy = afy;
    packet.afz = afz;
    packet.yaw = yaw;
    packet.yaw_rate = yaw_rate;
    packet.type_mask = type_mask;
    packet.fc_status1 = fc_status1;
    packet.fc_status2 = fc_status2;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_ZD_FCDATA_NX;
#if MAVLINK_CRC_EXTRA
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#else
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#endif
}

/**
 * @brief Pack a zd_fcdata_nx message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param frame_id [ms] frame_id.
 * @param fc_status1 [ms] frame_id.
 * @param fc_status2 [ms] frame_id.
 * @param q1  Quaternion component 1, w (1 in null-rotation)
 * @param q2  Quaternion component 2, x (0 in null-rotation)
 * @param q3  Quaternion component 3, y (0 in null-rotation)
 * @param q4  Quaternion component 4, z (0 in null-rotation)
 * @param rollspeed [rad/s] Roll angular speed
 * @param pitchspeed [rad/s] Pitch angular speed
 * @param yawspeed [rad/s] Yaw angular speed
 * @param type_mask  Bitmap to indicate which dimensions should be ignored by the vehicle.
 * @param x [m] X Position in NED frame
 * @param y [m] Y Position in NED frame
 * @param z [m] Z Position in NED frame (note, altitude is negative in NED)
 * @param vx [m/s] X velocity in NED frame
 * @param vy [m/s] Y velocity in NED frame
 * @param vz [m/s] Z velocity in NED frame
 * @param afx [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afy [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afz [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param yaw [rad] yaw setpoint
 * @param yaw_rate [rad/s] yaw rate setpoint
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,uint32_t frame_id,uint8_t fc_status1,uint8_t fc_status2,float q1,float q2,float q3,float q4,float rollspeed,float pitchspeed,float yawspeed,uint16_t type_mask,float x,float y,float z,float vx,float vy,float vz,float afx,float afy,float afz,float yaw,float yaw_rate)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, frame_id);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, q4);
    _mav_put_float(buf, 24, rollspeed);
    _mav_put_float(buf, 28, pitchspeed);
    _mav_put_float(buf, 32, yawspeed);
    _mav_put_float(buf, 36, x);
    _mav_put_float(buf, 40, y);
    _mav_put_float(buf, 44, z);
    _mav_put_float(buf, 48, vx);
    _mav_put_float(buf, 52, vy);
    _mav_put_float(buf, 56, vz);
    _mav_put_float(buf, 60, afx);
    _mav_put_float(buf, 64, afy);
    _mav_put_float(buf, 68, afz);
    _mav_put_float(buf, 72, yaw);
    _mav_put_float(buf, 76, yaw_rate);
    _mav_put_uint16_t(buf, 80, type_mask);
    _mav_put_uint8_t(buf, 82, fc_status1);
    _mav_put_uint8_t(buf, 83, fc_status2);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#else
    mavlink_zd_fcdata_nx_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.frame_id = frame_id;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.q4 = q4;
    packet.rollspeed = rollspeed;
    packet.pitchspeed = pitchspeed;
    packet.yawspeed = yawspeed;
    packet.x = x;
    packet.y = y;
    packet.z = z;
    packet.vx = vx;
    packet.vy = vy;
    packet.vz = vz;
    packet.afx = afx;
    packet.afy = afy;
    packet.afz = afz;
    packet.yaw = yaw;
    packet.yaw_rate = yaw_rate;
    packet.type_mask = type_mask;
    packet.fc_status1 = fc_status1;
    packet.fc_status2 = fc_status2;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_ZD_FCDATA_NX;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
}

/**
 * @brief Encode a zd_fcdata_nx struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param zd_fcdata_nx C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_zd_fcdata_nx_t* zd_fcdata_nx)
{
    return mavlink_msg_zd_fcdata_nx_pack(system_id, component_id, msg, zd_fcdata_nx->time_boot_ms, zd_fcdata_nx->frame_id, zd_fcdata_nx->fc_status1, zd_fcdata_nx->fc_status2, zd_fcdata_nx->q1, zd_fcdata_nx->q2, zd_fcdata_nx->q3, zd_fcdata_nx->q4, zd_fcdata_nx->rollspeed, zd_fcdata_nx->pitchspeed, zd_fcdata_nx->yawspeed, zd_fcdata_nx->type_mask, zd_fcdata_nx->x, zd_fcdata_nx->y, zd_fcdata_nx->z, zd_fcdata_nx->vx, zd_fcdata_nx->vy, zd_fcdata_nx->vz, zd_fcdata_nx->afx, zd_fcdata_nx->afy, zd_fcdata_nx->afz, zd_fcdata_nx->yaw, zd_fcdata_nx->yaw_rate);
}

/**
 * @brief Encode a zd_fcdata_nx struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param zd_fcdata_nx C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_zd_fcdata_nx_t* zd_fcdata_nx)
{
    return mavlink_msg_zd_fcdata_nx_pack_chan(system_id, component_id, chan, msg, zd_fcdata_nx->time_boot_ms, zd_fcdata_nx->frame_id, zd_fcdata_nx->fc_status1, zd_fcdata_nx->fc_status2, zd_fcdata_nx->q1, zd_fcdata_nx->q2, zd_fcdata_nx->q3, zd_fcdata_nx->q4, zd_fcdata_nx->rollspeed, zd_fcdata_nx->pitchspeed, zd_fcdata_nx->yawspeed, zd_fcdata_nx->type_mask, zd_fcdata_nx->x, zd_fcdata_nx->y, zd_fcdata_nx->z, zd_fcdata_nx->vx, zd_fcdata_nx->vy, zd_fcdata_nx->vz, zd_fcdata_nx->afx, zd_fcdata_nx->afy, zd_fcdata_nx->afz, zd_fcdata_nx->yaw, zd_fcdata_nx->yaw_rate);
}

/**
 * @brief Encode a zd_fcdata_nx struct with provided status structure
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 * @param zd_fcdata_nx C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_zd_fcdata_nx_t* zd_fcdata_nx)
{
    return mavlink_msg_zd_fcdata_nx_pack_status(system_id, component_id, _status, msg,  zd_fcdata_nx->time_boot_ms, zd_fcdata_nx->frame_id, zd_fcdata_nx->fc_status1, zd_fcdata_nx->fc_status2, zd_fcdata_nx->q1, zd_fcdata_nx->q2, zd_fcdata_nx->q3, zd_fcdata_nx->q4, zd_fcdata_nx->rollspeed, zd_fcdata_nx->pitchspeed, zd_fcdata_nx->yawspeed, zd_fcdata_nx->type_mask, zd_fcdata_nx->x, zd_fcdata_nx->y, zd_fcdata_nx->z, zd_fcdata_nx->vx, zd_fcdata_nx->vy, zd_fcdata_nx->vz, zd_fcdata_nx->afx, zd_fcdata_nx->afy, zd_fcdata_nx->afz, zd_fcdata_nx->yaw, zd_fcdata_nx->yaw_rate);
}

/**
 * @brief Send a zd_fcdata_nx message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (time since system boot).
 * @param frame_id [ms] frame_id.
 * @param fc_status1 [ms] frame_id.
 * @param fc_status2 [ms] frame_id.
 * @param q1  Quaternion component 1, w (1 in null-rotation)
 * @param q2  Quaternion component 2, x (0 in null-rotation)
 * @param q3  Quaternion component 3, y (0 in null-rotation)
 * @param q4  Quaternion component 4, z (0 in null-rotation)
 * @param rollspeed [rad/s] Roll angular speed
 * @param pitchspeed [rad/s] Pitch angular speed
 * @param yawspeed [rad/s] Yaw angular speed
 * @param type_mask  Bitmap to indicate which dimensions should be ignored by the vehicle.
 * @param x [m] X Position in NED frame
 * @param y [m] Y Position in NED frame
 * @param z [m] Z Position in NED frame (note, altitude is negative in NED)
 * @param vx [m/s] X velocity in NED frame
 * @param vy [m/s] Y velocity in NED frame
 * @param vz [m/s] Z velocity in NED frame
 * @param afx [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afy [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param afz [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 * @param yaw [rad] yaw setpoint
 * @param yaw_rate [rad/s] yaw rate setpoint
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_zd_fcdata_nx_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t frame_id, uint8_t fc_status1, uint8_t fc_status2, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz, float yaw, float yaw_rate)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, frame_id);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, q4);
    _mav_put_float(buf, 24, rollspeed);
    _mav_put_float(buf, 28, pitchspeed);
    _mav_put_float(buf, 32, yawspeed);
    _mav_put_float(buf, 36, x);
    _mav_put_float(buf, 40, y);
    _mav_put_float(buf, 44, z);
    _mav_put_float(buf, 48, vx);
    _mav_put_float(buf, 52, vy);
    _mav_put_float(buf, 56, vz);
    _mav_put_float(buf, 60, afx);
    _mav_put_float(buf, 64, afy);
    _mav_put_float(buf, 68, afz);
    _mav_put_float(buf, 72, yaw);
    _mav_put_float(buf, 76, yaw_rate);
    _mav_put_uint16_t(buf, 80, type_mask);
    _mav_put_uint8_t(buf, 82, fc_status1);
    _mav_put_uint8_t(buf, 83, fc_status2);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ZD_FCDATA_NX, buf, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#else
    mavlink_zd_fcdata_nx_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.frame_id = frame_id;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.q4 = q4;
    packet.rollspeed = rollspeed;
    packet.pitchspeed = pitchspeed;
    packet.yawspeed = yawspeed;
    packet.x = x;
    packet.y = y;
    packet.z = z;
    packet.vx = vx;
    packet.vy = vy;
    packet.vz = vz;
    packet.afx = afx;
    packet.afy = afy;
    packet.afz = afz;
    packet.yaw = yaw;
    packet.yaw_rate = yaw_rate;
    packet.type_mask = type_mask;
    packet.fc_status1 = fc_status1;
    packet.fc_status2 = fc_status2;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ZD_FCDATA_NX, (const char *)&packet, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#endif
}

/**
 * @brief Send a zd_fcdata_nx message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_zd_fcdata_nx_send_struct(mavlink_channel_t chan, const mavlink_zd_fcdata_nx_t* zd_fcdata_nx)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_zd_fcdata_nx_send(chan, zd_fcdata_nx->time_boot_ms, zd_fcdata_nx->frame_id, zd_fcdata_nx->fc_status1, zd_fcdata_nx->fc_status2, zd_fcdata_nx->q1, zd_fcdata_nx->q2, zd_fcdata_nx->q3, zd_fcdata_nx->q4, zd_fcdata_nx->rollspeed, zd_fcdata_nx->pitchspeed, zd_fcdata_nx->yawspeed, zd_fcdata_nx->type_mask, zd_fcdata_nx->x, zd_fcdata_nx->y, zd_fcdata_nx->z, zd_fcdata_nx->vx, zd_fcdata_nx->vy, zd_fcdata_nx->vz, zd_fcdata_nx->afx, zd_fcdata_nx->afy, zd_fcdata_nx->afz, zd_fcdata_nx->yaw, zd_fcdata_nx->yaw_rate);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ZD_FCDATA_NX, (const char *)zd_fcdata_nx, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#endif
}

#if MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_zd_fcdata_nx_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, uint32_t frame_id, uint8_t fc_status1, uint8_t fc_status2, float q1, float q2, float q3, float q4, float rollspeed, float pitchspeed, float yawspeed, uint16_t type_mask, float x, float y, float z, float vx, float vy, float vz, float afx, float afy, float afz, float yaw, float yaw_rate)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, frame_id);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, q4);
    _mav_put_float(buf, 24, rollspeed);
    _mav_put_float(buf, 28, pitchspeed);
    _mav_put_float(buf, 32, yawspeed);
    _mav_put_float(buf, 36, x);
    _mav_put_float(buf, 40, y);
    _mav_put_float(buf, 44, z);
    _mav_put_float(buf, 48, vx);
    _mav_put_float(buf, 52, vy);
    _mav_put_float(buf, 56, vz);
    _mav_put_float(buf, 60, afx);
    _mav_put_float(buf, 64, afy);
    _mav_put_float(buf, 68, afz);
    _mav_put_float(buf, 72, yaw);
    _mav_put_float(buf, 76, yaw_rate);
    _mav_put_uint16_t(buf, 80, type_mask);
    _mav_put_uint8_t(buf, 82, fc_status1);
    _mav_put_uint8_t(buf, 83, fc_status2);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ZD_FCDATA_NX, buf, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#else
    mavlink_zd_fcdata_nx_t *packet = (mavlink_zd_fcdata_nx_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->frame_id = frame_id;
    packet->q1 = q1;
    packet->q2 = q2;
    packet->q3 = q3;
    packet->q4 = q4;
    packet->rollspeed = rollspeed;
    packet->pitchspeed = pitchspeed;
    packet->yawspeed = yawspeed;
    packet->x = x;
    packet->y = y;
    packet->z = z;
    packet->vx = vx;
    packet->vy = vy;
    packet->vz = vz;
    packet->afx = afx;
    packet->afy = afy;
    packet->afz = afz;
    packet->yaw = yaw;
    packet->yaw_rate = yaw_rate;
    packet->type_mask = type_mask;
    packet->fc_status1 = fc_status1;
    packet->fc_status2 = fc_status2;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ZD_FCDATA_NX, (const char *)packet, MAVLINK_MSG_ID_ZD_FCDATA_NX_MIN_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN, MAVLINK_MSG_ID_ZD_FCDATA_NX_CRC);
#endif
}
#endif

#endif

// MESSAGE ZD_FCDATA_NX UNPACKING


/**
 * @brief Get field time_boot_ms from zd_fcdata_nx message
 *
 * @return [ms] Timestamp (time since system boot).
 */
static inline uint32_t mavlink_msg_zd_fcdata_nx_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field frame_id from zd_fcdata_nx message
 *
 * @return [ms] frame_id.
 */
static inline uint32_t mavlink_msg_zd_fcdata_nx_get_frame_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  4);
}

/**
 * @brief Get field fc_status1 from zd_fcdata_nx message
 *
 * @return [ms] frame_id.
 */
static inline uint8_t mavlink_msg_zd_fcdata_nx_get_fc_status1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  82);
}

/**
 * @brief Get field fc_status2 from zd_fcdata_nx message
 *
 * @return [ms] frame_id.
 */
static inline uint8_t mavlink_msg_zd_fcdata_nx_get_fc_status2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  83);
}

/**
 * @brief Get field q1 from zd_fcdata_nx message
 *
 * @return  Quaternion component 1, w (1 in null-rotation)
 */
static inline float mavlink_msg_zd_fcdata_nx_get_q1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field q2 from zd_fcdata_nx message
 *
 * @return  Quaternion component 2, x (0 in null-rotation)
 */
static inline float mavlink_msg_zd_fcdata_nx_get_q2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field q3 from zd_fcdata_nx message
 *
 * @return  Quaternion component 3, y (0 in null-rotation)
 */
static inline float mavlink_msg_zd_fcdata_nx_get_q3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field q4 from zd_fcdata_nx message
 *
 * @return  Quaternion component 4, z (0 in null-rotation)
 */
static inline float mavlink_msg_zd_fcdata_nx_get_q4(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field rollspeed from zd_fcdata_nx message
 *
 * @return [rad/s] Roll angular speed
 */
static inline float mavlink_msg_zd_fcdata_nx_get_rollspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field pitchspeed from zd_fcdata_nx message
 *
 * @return [rad/s] Pitch angular speed
 */
static inline float mavlink_msg_zd_fcdata_nx_get_pitchspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field yawspeed from zd_fcdata_nx message
 *
 * @return [rad/s] Yaw angular speed
 */
static inline float mavlink_msg_zd_fcdata_nx_get_yawspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field type_mask from zd_fcdata_nx message
 *
 * @return  Bitmap to indicate which dimensions should be ignored by the vehicle.
 */
static inline uint16_t mavlink_msg_zd_fcdata_nx_get_type_mask(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  80);
}

/**
 * @brief Get field x from zd_fcdata_nx message
 *
 * @return [m] X Position in NED frame
 */
static inline float mavlink_msg_zd_fcdata_nx_get_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field y from zd_fcdata_nx message
 *
 * @return [m] Y Position in NED frame
 */
static inline float mavlink_msg_zd_fcdata_nx_get_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Get field z from zd_fcdata_nx message
 *
 * @return [m] Z Position in NED frame (note, altitude is negative in NED)
 */
static inline float mavlink_msg_zd_fcdata_nx_get_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}

/**
 * @brief Get field vx from zd_fcdata_nx message
 *
 * @return [m/s] X velocity in NED frame
 */
static inline float mavlink_msg_zd_fcdata_nx_get_vx(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field vy from zd_fcdata_nx message
 *
 * @return [m/s] Y velocity in NED frame
 */
static inline float mavlink_msg_zd_fcdata_nx_get_vy(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Get field vz from zd_fcdata_nx message
 *
 * @return [m/s] Z velocity in NED frame
 */
static inline float mavlink_msg_zd_fcdata_nx_get_vz(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}

/**
 * @brief Get field afx from zd_fcdata_nx message
 *
 * @return [m/s/s] X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 */
static inline float mavlink_msg_zd_fcdata_nx_get_afx(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}

/**
 * @brief Get field afy from zd_fcdata_nx message
 *
 * @return [m/s/s] Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 */
static inline float mavlink_msg_zd_fcdata_nx_get_afy(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  64);
}

/**
 * @brief Get field afz from zd_fcdata_nx message
 *
 * @return [m/s/s] Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N
 */
static inline float mavlink_msg_zd_fcdata_nx_get_afz(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  68);
}

/**
 * @brief Get field yaw from zd_fcdata_nx message
 *
 * @return [rad] yaw setpoint
 */
static inline float mavlink_msg_zd_fcdata_nx_get_yaw(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  72);
}

/**
 * @brief Get field yaw_rate from zd_fcdata_nx message
 *
 * @return [rad/s] yaw rate setpoint
 */
static inline float mavlink_msg_zd_fcdata_nx_get_yaw_rate(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  76);
}

/**
 * @brief Decode a zd_fcdata_nx message into a struct
 *
 * @param msg The message to decode
 * @param zd_fcdata_nx C-struct to decode the message contents into
 */
static inline void mavlink_msg_zd_fcdata_nx_decode(const mavlink_message_t* msg, mavlink_zd_fcdata_nx_t* zd_fcdata_nx)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    zd_fcdata_nx->time_boot_ms = mavlink_msg_zd_fcdata_nx_get_time_boot_ms(msg);
    zd_fcdata_nx->frame_id = mavlink_msg_zd_fcdata_nx_get_frame_id(msg);
    zd_fcdata_nx->q1 = mavlink_msg_zd_fcdata_nx_get_q1(msg);
    zd_fcdata_nx->q2 = mavlink_msg_zd_fcdata_nx_get_q2(msg);
    zd_fcdata_nx->q3 = mavlink_msg_zd_fcdata_nx_get_q3(msg);
    zd_fcdata_nx->q4 = mavlink_msg_zd_fcdata_nx_get_q4(msg);
    zd_fcdata_nx->rollspeed = mavlink_msg_zd_fcdata_nx_get_rollspeed(msg);
    zd_fcdata_nx->pitchspeed = mavlink_msg_zd_fcdata_nx_get_pitchspeed(msg);
    zd_fcdata_nx->yawspeed = mavlink_msg_zd_fcdata_nx_get_yawspeed(msg);
    zd_fcdata_nx->x = mavlink_msg_zd_fcdata_nx_get_x(msg);
    zd_fcdata_nx->y = mavlink_msg_zd_fcdata_nx_get_y(msg);
    zd_fcdata_nx->z = mavlink_msg_zd_fcdata_nx_get_z(msg);
    zd_fcdata_nx->vx = mavlink_msg_zd_fcdata_nx_get_vx(msg);
    zd_fcdata_nx->vy = mavlink_msg_zd_fcdata_nx_get_vy(msg);
    zd_fcdata_nx->vz = mavlink_msg_zd_fcdata_nx_get_vz(msg);
    zd_fcdata_nx->afx = mavlink_msg_zd_fcdata_nx_get_afx(msg);
    zd_fcdata_nx->afy = mavlink_msg_zd_fcdata_nx_get_afy(msg);
    zd_fcdata_nx->afz = mavlink_msg_zd_fcdata_nx_get_afz(msg);
    zd_fcdata_nx->yaw = mavlink_msg_zd_fcdata_nx_get_yaw(msg);
    zd_fcdata_nx->yaw_rate = mavlink_msg_zd_fcdata_nx_get_yaw_rate(msg);
    zd_fcdata_nx->type_mask = mavlink_msg_zd_fcdata_nx_get_type_mask(msg);
    zd_fcdata_nx->fc_status1 = mavlink_msg_zd_fcdata_nx_get_fc_status1(msg);
    zd_fcdata_nx->fc_status2 = mavlink_msg_zd_fcdata_nx_get_fc_status2(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN? msg->len : MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN;
        memset(zd_fcdata_nx, 0, MAVLINK_MSG_ID_ZD_FCDATA_NX_LEN);
    memcpy(zd_fcdata_nx, _MAV_PAYLOAD(msg), len);
#endif
}
